1. Field of the Invention
The present invention relates to a microcomputer and, more particularly, to a digital/analog conversion device (referred to as "D/A conversion device" hereinafter) incorporated in a microcomputer which enables simultaneous outputs from a plurality of digital/analog converters (referred to as "D/A converter" hereinafter).
2. Description of the Prior Art
Referring to FIG.9, there is shown a D/A converter incorporated in a conventional microcomputer. FIG.9 is a circuit block diagram in the case of two D/A converters. In the figure, reference numeral 1 represents the data bus of the microcomputer which is connected to an unshown central processing unit. Denoted at 2a and 2b are switch circuits which are made conductive by write signals WRDA1 and WRDA2 from the central processing unit. When these switch circuits are conductive, data over the data bus 1 is written onto conversion registers. The write signals WRDA1 and WRDA2 are supplied from the central processing unit, but these signals are transmitted not simultaneously but independently. Denoted at 4a and 4b are conversion registers (DA-1) and (DA-2), respectively, which latch digital value data read from the data bus 1 with the switch operation of the switch circuits 2a and 2b. Designated at 7a and 7b are resistance ladders (DA-1) and (DA-2), respectively, which are the combinations of a plurality of resistors and switch circuits connected in the ladder configuration and convert the digital value data latched by the conversion registers (DA-1) 4a and (DA-2) 4b into corresponding analog voltages. Designated at 5a and 5b are analog voltage output terminals which output analog voltages converted by their respective resistance ladders (DA-1) 3a and (DA-2) 3b to external circuits.
A description is subsequently given of the operation of the prior art. A predetermined analog voltage from one of the two D/A converters shown in FIG.9, for instance, a voltage of 5V from the analog voltage output terminal 5a, is generated in the following manner. The switch circuit 2a is first made conductive by an address value indicative of the position of the switch circuit 2a, that is, the write signal WRDA1 from the unshown central processing unit, so that digital value data "OOXXH" (expressed in hexadecimal notation) corresponding to the analog voltage of 5 V is written onto the conversion register (DA-1) 4a through the data bus 1. Now, the digital value data written onto the conversion register (DA-1) 3a is latched until the next digital value data is written. The digital value data "OOXXH" written onto the conversion register (DA-1) 3a is converted into a corresponding analog voltage of 5V by the resistance ladder (DA-1) 7a and the analog voltage is output to the external circuit from the analog voltage output terminal 5 a. The process of outputting a predetermined analog voltage from the analog voltage output terminal 5b is the same as described above, but it is completely independent from the process for the analog voltage output terminal 5a. FIG. 10(A) shows the sine wave of an analog voltage signal output from the D/A converter of this prior art, that is, a signal output from the analog voltage output terminal (DA-1) 5a. Actually, the sine wave has a stepped waveform with a maximum amplitude of 5V in increments of 0.2V at time intervals of 0.1 ms as shown in FIG. 10(B). FIG. 10(C) shows a signal output from the analog voltage output terminal (DA-2) 5b and is different from the sine wave of FIG. 10(A) by a phase of .pi./2.
Since the D/A converter incorporated in the microcomputer of the prior art is structured as described above, the digital value data latched by the conversion registers (DA-1) 4a and (DA-2) 4b included in the respective D/A converters cannot be changed simultaneously. As described above, since there is a time lag in the alteration of data stored in the two registers, it is impossible to change output voltage signals output from the analog voltage output terminals 5a and 5b simultaneously. For instance, to output the sine waves as shown in FIGS. 10(A) and (C), both the hardware and software for controlling the phase difference between these waves must be extremely complex. The problem of phase difference can even be fatal in such a complex system where the sine wave is used as a reference voltage wave for controlling an inverter circuit for the control of a motor.
The present invention is intended to solve the above-mentioned problem, and it is therefore an object of the invention to provide a D/A conversion device in which output voltage signals from the analog voltage output terminals of a plurality of D/A converters can be changed by a central processing unit simultaneously.